Pooka SDK Developer Guide
Development Environment Setup

Developer Computer Set up

Developers need to set up their developer computer before they are able to build and deploy Pooka SDK® applications, which has the following steps involved:

  • Install the SDK
    Pooka SDK® may be delivered in two different packages:
    • an executable installer, such as Pooka SDK [edition] [version].msi or Pooka SDK [edition] [version].dmg
    • a Zip archive, such as Pooka SDK [edition] [version].zip
    The installer is a wizard guided program that installs the SDK to developers' computer.
    The Zip package is a standard Zip archive that can be unpacked manually by developers to the desired location on developers' computer.
  • Install recommended IDEs
    The recommended IDEs (Visual Studio, XCode) might have been installed prior to install Pooka SDK®. In this case, developers needs to check where all required IDE components are installed for Pooka SDK® app development. If not, add the missing IDE components.
  • Additional Third-party Component Setup
    Install the additional third-party component needed for Pooka SDK® app development.
  • SDK Path Setup
    This step may not needed if developers use installer to install Pooka SDK® and the Pooka_SDK environment variable (Windows) and custom path (macOS/XCode) are successfully set.
    If developers unpack the Pooka SDK® by the Zip archive, or the installer fails to set the path properly, then developers need to manually set the Pooka_SDK variable / path in their system.

The following chart shows the details of each steps to prepare developers' computer for Pooka SDK® application development.

Host OS1
Windows 101
macOS X1
Step 1 -
Install Pooka SDK®
Run Pooka SDK® installer (Windows Edition) to install the SDK, or unpack the Zip archive manually.
  • If the SDK is installed by installer, the install destination path should not contains any space character2, and the destination should not be a very deep location.3
  • If the SDK is unpacked from Zip archive, remember to unpack it to a pre-created directory where the path does not containing space character (' ')2 and the path is not too long.3
Run Pooka SDK® installer (macOS Edition) to install the SDK, or unpack the Zip archive manually.
  • If the SDK is installed by installer, the install destination path should not contains any space character2, and the destination should not be a very deep location.3
  • If the SDK is unpacked from Zip archive, remember to unpack it to a pre-created directory where the path does not containing space character (' ')2 and the path is not too long.3
Step 2 -
Install recommended IDEs
Install Visual Studio 2015 (update 3) or Visual Studio 2017 (15.5) 4 with at least the following components selected:
  • Programming Languages: Visual C++
  • Windows and Web Development: Universal Windows App Development Tools
  • Cross Platform Mobile Development: Visual C++ Mobile Development
Install XCode 8.x or XCode 9.x 5 with the version support the following minimum platforms:
  • macOS 10.12 (Sierra)
  • iOS 10.x
Step 3 -
Additional Third-party Component Setup
For UWP Development: Download and install Microsoft Advertising SDK
For Android Development: Install the optional component Google Play Services Component with Android SDK Manager. Launch Android SDK Manager ("SDK Manager.exe") with administrator privileges, then in package tree view, select the following packages and install them:
  • Extras \ Google Play services (Minimum Reversion: 30)
  • Extras \ Google Repository (Minimum Reversion: 30)
  • Extras \ Google Play Billing Library (Minimum Revision: 5)
Nothing
Step 4 -
Pooka SDK® Path Setup6
Add Pooka_SDK environment variable with the value pointing to the Pooka SDK® root directory.
To add an Windows environment variable, go to "This PC / Properties / Advanced System Settings / Environment Variables".
In XCode preference, go to "Locations / custom paths (tab)", add a new custom path Pooka_SDK with value pointing to the Pooka SDK® root directory.

 Note 
1 - The host OS is used to host the application development tool set and IDE, which is irrelevant to the target platform of the Pooka SDK® application.
Pooka SDK® recommended host OSs are:

  • Windows 10 64-bit, Version 1607 or above
  • macOS 10.12 sierra or above

2 - If Pooka SDK® is installed on a location with path contains space character, then sample applications may be unable to be built for certain types of platforms, such as Android. The workaround is moving sample projects to a location with path does not contain space character, like X:\Pooka_Sample_Projects.

3 - Pooka SDK®'s sample projects has very deep directory structure, therefore their project and source code have very long file path. If the SDK itself is installed on a location with long path, it may easily make the project and source code path exceed the operating system path length limitation (such as 250 characters) and cause sample projects unable to be built. Solutions:

  • Install Pooka SDK® on the location with short path, like "X:/Pooka SDK".
  • Move a sample project to a new location with shorter path before build it.

4 - Using older version Visual Studio to build Pooka SDK® application may not work, or the generated executable is not compatible with latest version Windows platform.

5 - Using older version XCode to build Pooka SDK® application may not work, or the generated executable is not compatible with latest version macOS and iOS.

6 - This step is only needed if If Pooka SDK® is installed by unpacking the Zip archive, or the installer failed to set the Pooka_SDK environment variable or custom path.

Manually Set SDK Environment Variable / Custom Path

If Pooka SDK® is installed by the SDK installer, the Pooka_SDK environment variable (Windows) or XCode custom path (macOS) should be successfully set upon successful installation, which is very important because Pooka SDK® project relies on this variable or path to find needed SDK headers and libraries.

There might be some cases that this environment variable or custom path can not be set by installer properly, such as:

  • The installer is not launched under an administrator user account
  • The Visual Studio or XCode is not properly installed
  • The XCode has never been launched once since it is installed

In any cases that the Pooka_SDK environment variable or custom path is properly set, developers need to manually set it in host OSs:

  • On Windows 10, open System Properties dialog, then click Advanced system settings, in the next pop-out dialog, click Environment Variables button. Add or set Pooka_SDK variable in either "user variables" or "system variables".7 8
  • On macOS X, launch XCode, then open Preferences... dialog, choose Locations tab then select Custom Paths. Add or set Pooka_SDK custom path.8

 Note 
7 - Note that on Windows, the "user variables" take precedence over the "system variables" (except the PATH variable).
8 - If the IDE is currently running, then restarting the IDE is needed.

Get familiar with Pooka SDK

Read Pooka SDK® Directory Structure and Tools

Recommended and Alternative Development IDEs

Developers can use recommended development tools (IDE) to develop applications with Pooka SDK®, see the recommended IDEs listed in the chart below.
Alternatively, there are plenty of IDEs that can be used for Pooka SDK® application development. The sample applications included in the Pooka SDK® are provided with project file for only recommended IDE. In order to other alternative IDEs, developers need to prepare proper project settings and building scripts to build the sample applications.

Caution It is developer's own choice to use alternative IDEs for Pooka SDK® app development, which requires strong knowledge on native platform SDK and IDE configuration.
Caution Due to compiler difference, Pooka SDK® applications generated by alternative IDEs may not perform properly and consistently.
Caution Pooka SDK® does not provide any technical support for alternative IDEs.

App Target OS Recommended IDE Alternative IDE
App For Windows Desktop
Visual Studio 2015, 20179
Visual Studio 2008, 2010, 2012, 2013
Eclipse, NetBeans, C++ Builder
App For Windows UWP
Visual Studio 2015, 20179
 
App For Android
Visual Studio 2015, 20179
Android Studio, Eclipse, NetBeans
App For macOS
XCode 8.x, 9.x10
 
App For iOS
XCode 8.x, 9.x10
Visual Studio 2015, 2017

 Note 
9 - Visual Studio 2015 (update 3), 2017 (15.5) with following components installed: a. Programming Languages: Visual C++ b. Windows and Web Development: Universal Windows App Development Tools c. Cross Platform Mobile Development: Visual C++ Mobile Development
10 - XCode 8.x, 9.x with following minimum platform support: a. macOS 10.12 b. iOS 10.x

What do Developers Need to Know When Using Alternative IDE

Using alternative IDE to develop Pooka SDK® applications requests solid knowledge on platform's application SDK and build tools. Developers also need to be proficient in IDE's build tools and project properties. Particularly, the following questions should be listed on the check list before start trying Pooka SDK® application with an alternative IDE:

  • What compiler do this IDE support (MS VC++, GCC, CLANG)?
  • What target platform and processor architecture do this IDE support (x86, x86-64, Arm, Arm64)?
  • Where to find all dependency libraries (OpenGL, OpenGL ES, DirectX, Math, stdio, etc.)?
  • (Android particular) How to set up project / build script to compile C++ source code?
  • (Android particular) How to set up project / build script to compile Android Interface Definition Language (AIDL)?
  • (Android particular) How to set up project / build script to add dependency libraries during "DEX" stage?

All sample projects of Pooka SDK® are provided with projects files used for recommended development IDE.


Common Problems in SDK Installation

Issue: During application compilation, can not find header file "MiniFC.h"

Issue: Sample Projects can not be built with various file name related problems

  • Reason: Sample project is located somewhere with file path exceeds the operating system path limitation (example: 250 characters).
  • Fix: Move the sample project to a location with shorter file path.

Issue: Can not deploy a successfully built application

Reason: There are various reason for causing the case of unable to deploy Pooka SDK® application on the target device, such as:

  • 1. The application is not properly signed with at least a debug key and token.
  • 2. There is an existing application deployed earlier by different signing credentials.
  • 3. The minimum target platform OS version claimed in application manifest is higher than the version of the target device.
  • 4. The application architecture interface (ABI) of the application is different from the target device's. For example, try to deploy a 64-bit application on a 32-bit device.
  • 5. Communication problem between the host computer and the target device. Fix: Refer to the platform's developers' guide. For the case of #2, simply uninstall the old application from the device.

Issue: (Visual Studio specific) Application Build fails because sue to missing project source code

  • Details: error "cl : Command line error D8003: missing source filename"
  • Reason: The Pooka_SDK environment variable's value has a trailing slash (\), such as X:\PookaSDK\.
  • Fix: Remove the trailing slash (\). Refer to the Manually Set SDK Environment Variable / Custom Path.

### Issue: (Windows UWP specific) Application deployment fails with identity conflicts#

  • Details: error "DEP0700 : Registration of the app failed. Another user has already installed an unpackaged version of this app."
  • Reason: Multiple Windows UWP use same application identity.
  • Fix: Assign the UWP application a new application GUID.
    Open source code file "Res/Package.appxmanifest" with source code editor, generate a new GUID by "Tools / Create GUID". Use the new GUID to replace the attributes Name and PhoneProductId in the following code snippet:
    <Identity Name="1746A6DC-DAD8-4022-9691-890DE36A291D" Publisher="CN=MyCompany" Version="1.0.0.0" />
    <mp:PhoneIdentity PhoneProductId="1746A6DC-DAD8-4022-9691-890DE36A291D" PhonePublisherId="00000000-0000-0000-0000-000000000000" />

Issue: (Android specific) Apache ant fails to build Android application

  • Details: error MSB3073: The command ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\Apps\apache-ant-1.9.3\\bin\ant.bat" -Dtarget=android-19 -DProjectDir=X:\Pooka SDK\Samples\MiniFC.NetExt\HttpClient\WebImage\WebImage.Android\WebImage.Packaging\ debug -Dout.final.file=\"X:\temp\Pooka SDK\Samples\MiniFC.NetExt\HttpClient\WebImage\WebImage.Android\WebImage.Packaging\_Bin_\ARM64\Debug\WebImage.apk"" exited with code 1.
  • Reason: The Pooka SDK® is installed on a location with path contains space character (' ').
  • Fix: Re-install Pooka SDK® on a location with path does not contain any space character (' ').

Issue: (Android specific) In Manifest.xml, no resource found that matches the given name (at 'icon' with value '@drawable/icon').

Issue: (Android specific) The "src" folder must be manually created for AIDL compiling

Issue: (Android specific) Google Play services SDK cannot be found or is not properly installed.

  • Reason: There is no valid Google Play services component installed in Android SDK.
  • Fix: Refer to the "Step 3" of "Developer Computer Set up".